/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package service.impl;

import eao.EaoLocal;
import java.util.List;

/**
 *
 * @author dingnangen
 * @param <E>
 */
public abstract class AbstractService<E> {
//    @Override

    public String gettest() {
        return "this is a string";
    }

    protected abstract EaoLocal<E> getEao();

    public void create(E entity) {
        getEao().create(entity);
    }

    public E edit(E entity) {
        return getEao().edit(entity);
    }

    public void remove(E entity) {
        getEao().remove(entity);
    }

    public E find(Object id) {

        return getEao().find(id);
    }

    public E findOneItem(String str, List p) {

        return getEao().findOneItem(str, p);
    }

    public List<E> findAll() {

        return getEao().findAll();
    }

    public List<E> findAll(String str, List p) {

        return getEao().findAll(str, p);
    }

    public List<E> findRange(int[] range) {

        return getEao().findRange(range);
    }

    public List<E> findRange(int[] range, String str, List p) {

        return getEao().findRange(range, str, p);
    }

    public int count() {

        return getEao().count();
    }

    public int count(String str) {

        return getEao().count(str);
    }

    public int count(String str, List pList) {

        return getEao().count(str, pList);
    }
}
